package com.woniu.search.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author 杨光 微信号:tolryg
 * @time 10:40
 */
@Document(indexName = "testwoniu84")
public class Test {


    @Id
    @Field(name = "id", type = FieldType.Long)
    private Long id;
    @Field(name = "name", type = FieldType.Text, analyzer = "ik_max_word")
    private String name;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Test{" +
                "id=" + id +
                ", name='" + name + '\'' +
                '}';
    }
}
